<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<p:menubar>

		<!-- Client tabs  -->
		<p:menuitem value="Trip Search" url="trip-search.xhtml"
			rendered="#{auth.role == 0}" icon="ui-icon-search" />
		<p:menuitem value="Schedule" url="schedule.xhtml"
			rendered="#{auth.role == 0}" icon="ui-icon-note" />
		<p:menuitem value="Bought tickets" url="bought-tickets.xhtml"
			rendered="#{auth.role == 0}" icon="ui-icon-check" />

		<!-- Manager tabs  -->
		<p:menuitem value="Passengers" url="passengers.xhtml"
			rendered="#{auth.role == 1}" icon="ui-icon-person" />
		<p:menuitem value="Trips" url="trips.xhtml"
			rendered="#{auth.role == 1}" icon="ui-icon-note" />
		<p:menuitem value="Edit stations" url="edit-stations.xhtml"
			rendered="#{auth.role == 1}" icon="ui-icon-pencil" />
		<p:menuitem value="Edit trips" url="edit-trips.xhtml"
			rendered="#{auth.role == 1}" icon="ui-icon-pencil" />
		<p:menuitem value="Edit routes" url="edit-routes.xhtml"
			rendered="#{auth.role == 1}" icon="ui-icon-pencil" />

		<f:facet name="options">
			<h:form>
				<table>
					<tr>
						<td><h:outputText value="#{auth.FIO}" styleClass="FIO" /></td>
						<td><p:commandButton type="submit" value="Logout"
								icon="ui-icon-extlink" action="#{auth.logout}"
								styleClass="logoutButton" /></td>
					</tr>
				</table>
			</h:form>
		</f:facet>

	</p:menubar>

</ui:composition>

